import store from 'store2'
let {session} = store.namespace('page')

export function init_page($route) {
  let {name, params} = $route
  if (name == undefined) {
    // console.warn('name 为空')
    return
  }
  if (Object.keys(params).length) {
    session(name, params)
    return params
  } else {
    return session(name)
  }
}
